package com.lagou.edu.homework.service;

import com.lagou.edu.homework.service.fallback.EmailFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Service
@FeignClient(name = "lagou-service-email", fallback = EmailFallback.class)
public interface EmailFeignClient {

    @RequestMapping(value = "/api/email/{email}/{code}", method = RequestMethod.GET)
    Boolean sendEmail(@PathVariable(value = "email") String email, @PathVariable(value = "code") String code);
}
